package com.mcx.modules.data.localdata.create;

import com.mcx.modules.data.GameDataTableParser;
import com.mcx.modules.data.base.AbstractDBModel;

/** RechargeShop数据管理 */
public class RechargeShopDBModel extends AbstractDBModel<RechargeShopDBModel, RechargeShopEntity>
{
    private static RechargeShopDBModel instance;

    public static RechargeShopDBModel getInstance() {
        if (instance == null) {
            instance = new RechargeShopDBModel();
        }
        return instance;
    }

    /** 文件名称 */
    @Override
    protected String FileName() {
        return "RechargeShop.data";
    }

    /** 创建实体 */
    @Override
    protected RechargeShopEntity MakeEntity(GameDataTableParser parse)
    {
        RechargeShopEntity entity = new RechargeShopEntity();
        entity.Id = parse.GetFieldValueToInt("Id");
        entity.Type = parse.GetFieldValueToInt("Type");
        entity.Price = parse.GetFieldValueToInt("Price");
        entity.Name = parse.GetFieldValueToUTF8String("Name");
        entity.SalesDesc = parse.GetFieldValueToUTF8String("SalesDesc");
        entity.ProductDesc = parse.GetFieldValueToUTF8String("ProductDesc");
        entity.Virtual = parse.GetFieldValueToInt("Virtual");
        entity.Icon = parse.GetFieldValueToUTF8String("Icon");
        return entity;
    }
}
